﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="${basePath}">
    <title>"蓝桥怀"软件学院在线考试系统</title>
    <link rel="icon"  href="../../images/favicon.ico" type="image/x-icon" />
    <link rel="bookmark" href="images/favicon.ico" type="image/x-icon"/>
<%@include file="../common_resource.jsp" %>

	  <style>
		  .panel-body{
			  font-size: 15px;
		  }
	  </style>
<script type="text/javascript">

$(function(){
	
	$("#submitBtn").click(function(){
		
		var userFormData = $("#userForm").serialize();
		$.post("user/updateUser.do",userFormData,function(json) {
			if(json.row == 1){
				$("#updateSuccessModal").modal();
				$("#closeSuccessModal").click(function(){
					$("#updateSuccessModal").attr("data-dismiss","modal");
					$("input").prop("readonly","readonly");//readonly="readonly" id="" 
				});
			}else{
				$("#feildModal").modal();
			}
		},'json');
	});
	
});

</script>

</head>
<body class="main_body" >
<div class="container container-1180" >    
<div class="col" style="margin-top: 10px;">
	<div class="panel panel-info">
		<div class="panel-heading">
			<span ><i class="fa fa-user"></i></span> <label><font style="font-weight: bold;margin-left: 10px;font-size: 17px">用&nbsp;户&nbsp;新&nbsp;增</font></label>
		</div>
		<div class="panel-body">
			<div>
			<form id="userForm" name="userForm" action="users/insertStudent" class="form-horizontal " role="form" method="post">
				
				<div class="form-group">
				    <label for="" class="col-sm-4 control-label">学号:</label>
				    <div class="col-sm-4">
				    <label>
				  	  <div class="input-group text">
						<span class="input-group-addon">
							<i class="fa fa-user"></i>
				      </span><input type="text" name="sstsNo" placeholder="请输入学号" class="form-control" required="true">
				    </div>
				    </label>
			   </div>
			   </div>
				<div class="form-group">
					<label for="" class="col-sm-4 control-label">用户名：</label>
					<div class="col-sm-4">
						<label>
							<div class="input-group text">
						<span class="input-group-addon">
							<i class="fa fa-user"></i>
							</span>	<input type="text" name="username" placeholder="请输入用户名" id="username" required="true" class="form-control">
							</div>
						</label>
					</div>
				</div>
			   <div class="form-group">
				    <label for="" class="col-sm-4 control-label"><font color="red"><b>*</b></font>新密码:</label>
				    <div class="col-sm-4">
				      <label><div class="input-group password">
						<span class="input-group-addon">
							<i class="fa fa-lock"></i>
							</span><input type="password"  placeholder="请输入新密码" class="form-control" id="" required="true">
				      </div>
				     </label>
				    </div>
			   </div>
			   
			   <div class="form-group">
				    <label for="" class="col-sm-4 control-label"><font color="red"><b>*</b></font>确认密码:</label>
				    <div class="col-sm-4">
				     <label><div class="input-group password">
						<span class="input-group-addon">
							<i class="fa fa-lock"></i></span>
							 <input type="password" name="password" placeholder="请确认密码" class="form-control"  required="true">
					</div></label>
				    </div>
			   </div>
				<div class="modal-footer" style="text-align: center">
					<button type="submit" class="btn btn-primary" data-dismiss="modal">保存</button>
					<button type="reset" class="btn btn-danger">重置</button>
				</div>
			</form>
			</div>
		</div>
	</div>
</div>
<div>
</div>
</div>
</body>
</html>
